<html xmlns="http://www.w3.org/1999/xhtml" xmlns:v="urn:schemas-microsoft-com:vml" >
  <head>
	<style type="text/css">v\:* {behavior:url(#default#VML);}</style>
	<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
	<title>DSI Web CBS Uygulaması</title>
    <script src="http://maps.google.com/maps?file=api&amp;v=2.x&amp;key=ABQIAAAAKs6JW4Ceutf3PhUEdqWEYhRz1i_H7XZhz5jeQkJqrqCVv6ORyBS7gL-HwCcW2kxMCMWW1SM5mnFeRg"
            type="text/javascript"></script>

    <style type="text/css">
        @import "js/dojo/dijit/themes/soria/soria.css";
        @import "js/dojo/dojo/resources/dojo.css";
		@import "css/cbs.css";	
    </style>
	
    <script type="text/javascript" src="js/dojo/dojo/dojo.js" djConfig="parseOnLoad: true, isDebug: true" ></script>
	<script type="text/javascript">
        dojo.require("dojo.parser");
		
		dojo.require("dijit.Toolbar");
		dojo.require("dijit.layout.LayoutContainer");
		dojo.require("dijit.layout.SplitContainer");
		dojo.require("dijit.layout.AccordionContainer");
		dojo.require("dijit.layout.TabContainer");
		dojo.require("dijit.layout.ContentPane");
		
		dojo.require("dijit.form.Button"); 
		dojo.require("dijit.Menu");
		//dojo.require("dijit.Tooltip");		
		
    </script>
    <!-- Kendi js'lerimizi ekliyoruz -->
    <script src="js/map/dragzoom.js" type="text/javascript"></script>
	<script src="js/map/options.js" type="text/javascript"></script>
    <script src="js/map/functions.js" type="text/javascript"></script>
	<!-- Kendi js'lerimizi ekliyoruz -->
    <script type="text/javascript">
	
	 //<![CDATA[
    function initialize() { //Load Fonksiyonu basliyor
		  
	  if (GBrowserIsCompatible()) { // Tarayici kontrolu basliyor
        map = new GMap2(document.getElementById("mapPane"));
		map.setCenter(new GLatLng(centerx, centery), firstZoom);
		//map.setMapType(G_SATELLITE_MAP);
		map.setMapType(G_PHYSICAL_MAP);
        
		map.enableDoubleClickZoom();
		map.enableContinuousZoom();	
		
		//Haritaya eklediğimiz kontroller basliyor
		//overview kontrolü
		smallMapView = new GOverviewMapControl();
		map.addControl(smallMapView);

		//Scale kontrolü 
		scaleControl = new GScaleControl();
		map.addControl(scaleControl);		
		
		//Drag Zoom ekliyoruz.
		map.addControl(myDragZoom);
		
		
  		//map.addControl(new GZoomControl(zoomBoxStyles,zoomBoxHTML,null),new GControlPosition(G_ANCHOR_TOP_LEFT,new GSize(1,1)));
		//map.addControl(new GInfoControl(infoBoxStyles,infoBoxHTML,infoCallBacks),new GControlPosition(G_ANCHOR_TOP_LEFT,new GSize(28,1)));
				
		//layerPControl = new LayerPanelControl(); 
		//map.addControl(layerPControl);	
		
		//map.addControl(new DSICopyRight());
				
		//Haritaya eklediğimiz kontroller bitti.
				
		//Haritaya eklediğimiz listenerlar başlıyor	
		// haritada hareket bitince son halini kaydetmek icin listener
		
		//GEvent.addListener(map, "moveend", saveHistory);
		
		// Harita hareket ettikçe çalışacak fonksiyonu listener'a ekliyoruz.
      	
		
		//GEvent.addListener(map, "move", function() {
		//	checkBounds();
      	//});
		
		//Haritaya eklediğimiz listenerlar bitti.


		
		// Kullanıcının Zoom seviyesini ayarlıyoruz      	
		// Harita tiplerini alıyoruz      
      	
		//var mt = map.getMapTypes();
      	
		// getMinimumResolution() ve getMaximumResolution() metotlarının üstüne yazıyoruz
      	//for (var i=0; i<mt.length; i++) {
        //	mt[i].getMinimumResolution = function() {return firstZoom;}
        //	mt[i].getMaximumResolution = function() {return lastZoom;}
      	//}		
		// Kullanıcının Zoom seviyesini ayarlandı.
		
		
		
		//Buraya kendi tile katmanımız gelecek
		//copyright
		var myCopyright = new GCopyrightCollection('(c)');
		myCopyright.addCopyright(new GCopyright('Demo', new GLatLngBounds(new GLatLng(-90,-180), new GLatLng(90,180)),0,'Ministry of Forest and Environment'));
                       
		//tile layer
		var tilelayer = new GTileLayer(myCopyright, 0,14 );     //Your mim/max levels
		tilelayer.getTileUrl = function(tile,zoom){return 'http://localhost/dsi/' + zoom + '/' + tile.x + '/' + tile.y + '.png';};
		tilelayer.isPng = function() { return true;};
		tilelayer.getOpacity = function() { return 0.8; }
               
		//add as overlay on map
		var myTileLayer = new GTileLayerOverlay(tilelayer);
		map.addOverlay(myTileLayer);
		
		
					
      } // tarayici kontrolu biter 
	  //setTimeout('gMapResize()', 2000);
	  //gMapResize();

	  mapPaneNode = dojo.byId("mapPane");
	  mapPaneConnection = dojo.connect(mapPaneNode, 'onLoad', gMapResizeAtStart());
    } // load fonksiyonu biter
	
    //]]>

	function gMapResizeAtStart() {
		setTimeout('map.checkResize()', 500); //map.checkResize();
		setTimeout('map.setCenter(new GLatLng(centerx, centery), firstZoom)',600);
	}

    </script>
  </head>
  <body class="soria" onLoad="initialize()" onUnload="GUnload()">
		
			<div dojoType="dijit.layout.LayoutContainer" id="main">
		<div dojoType="dijit.layout.ContentPane" id="logoDiv" layoutAlign="top" style="height:50px; background-color:#98c2da; ">
			<img src="images/dsi_logo.jpg" alt="" width="900" height="50" />
		</div>
		<!-- toolbar for maps apps. -->
		<div dojoType="dijit.Toolbar" layoutAlign="top" style="height:35px;">
			<button id="zoomIn" dojoType="dijit.form.Button" iconClass="cbsIconZoomIn">
				<script type="dojo/method" event="onClick">
					zoomIn();
				</script>
			</button>
			<button id="zoomOut" dojoType="dijit.form.Button" iconClass="cbsIconZoomOut">
				<script type="dojo/method" event="onClick">
					zoomOut();
				</script>
			</button>
			<button id="zoomBox" dojoType="dijit.form.Button" iconClass="cbsIconZoomBox">
				<script type="dojo/method" event="onClick">
					myDragZoom.initiateZoom();
				</script>
			</button>
			<button id="fullExtent" dojoType="dijit.form.Button" iconClass="cbsIconFullExtent">
				<script type="dojo/method" event="onClick">
					mapOverview();
				</script>
			</button>
			<button id="measure" dojoType="dijit.form.Button" iconClass="cbsIconMeasure">
				<script type="dojo/method" event="onClick">
					alert("Measure");
				</script>
			</button>
			<button id="infoBox" dojoType="dijit.form.Button" iconClass="cbsIconInfoOff">
				<script type="dojo/method" event="onClick">
					//alert("Info Box");
					myDragZoom.initiateZoomBack();
				</script>
			</button>		   
		</div>
		<!-- toolbar for maps apps. -->
		
		<div dojoType="dijit.layout.ContentPane" layoutAlign="bottom" 
		     id="footer" align="left">
			<span style="float:right;">DojoCBS v1.0</span>

			Buraya progress bar gelecek!
		</div>

		<div dojoType="dijit.layout.ContentPane" 
		    id="tabsx" jsId="tabs" layoutAlign="client">

            			<!-- main section with tree, table, and preview -->
			<div dojoType="dijit.layout.SplitContainer"
				orientation="horizontal"
				sizerWidth="5"
				activeSizing="0"
				title=""
			>
		
				<div dojoType="dijit.layout.AccordionContainer" sizeMin="20" sizeShare="20">
					<div dojoType="dijit.layout.AccordionPane" title="Folders">
					    Buraya bişeyler gelecek! - 1
					</div>

					
					<div dojoType="dijit.layout.AccordionPane" title="Address Book">
					    Buraya bişeyler gelecek! - 2
					</div>
				</div>
				
				<div dojoType="dijit.layout.SplitContainer"
					id="rightPane"
					orientation="vertical"
					sizerWidth="5"
					activeSizing="0"
					sizeMin="50" sizeShare="85"
				>
					<div id="mapPane" dojoType="dijit.layout.ContentPane" sizeMin="80" sizeShare="80">
					  
					</div>
					
					<div id="message" dojoType="dijit.layout.ContentPane" sizeMin="20" sizeShare="20">
					    Sorgu sonuçları buraya gelecek!
					</div>

				</div> <!--  End right hand side split container -->
					
			</div><!-- End entire-screen split container -->
            

		</div> <!--  End tab container -->
	</div> <!--  End layout container -->
		
		
	</body>
</html>





